package com.lmy.springCloud.controller;

import com.lmy.springCloud.service.MemberFeignService;
import com.lmy.springCloud.utils.Result;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class MemberConsumerFeignController {

    //装配MemberFeignService，实例类型的是实现了接口的代理对象
    @Resource
    private MemberFeignService memberFeignService;

    @RequestMapping(value = "member/consumer/openFeign/get/{id}")
    public Result getMemberById(@PathVariable(value = "id") Long id) {
        return memberFeignService.getMemberById(id);
    }

}
